package com.jsjvm.server.dbgproxy.jdwp.data;

public class JDWPRequestHeader {
	private int length;
	private int id;
	private byte commandSet;
	private byte command;

	public JDWPRequestHeader(int length, int id, byte commandSet, byte command) {
		super();
		this.length = length;
		this.id = id;
		this.commandSet = commandSet;
		this.command = command;
	}
	public int getDataLength() {
		return length - 11;
	}
	public int getId() {
		return id;
	}
	public byte getCommandSet() {
		return commandSet;
	}
	public byte getCommand() {
		return command;
	}
	
	@Override
	public String toString() {
		return "lg: " + length + " id: " + id + " cmd: " + commandSet + "-" + command;
	}
	
}
